package com.hs.srm.admin.modules.harmfulsubstance.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.hs.srm.base.common.base.CloneableEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * (SvhcVendorHeadEntity)供应商填写高度关注物质清单记录实体类
 *
 * @author ych
 * @since 2020-03-12 09:11:25
 */

@Setter
@Getter
@ToString
@TableName("svhc_vendor_head")
public class SvhcVendorHeadEntity implements Serializable, CloneableEntity<SvhcVendorHeadEntity> {
    private static final long serialVersionUID = 301688295594376562L;

    public SvhcVendorHeadEntity() {

    }

    public SvhcVendorHeadEntity(String svhcHeadId, String sapCode, Date editDate) {
        this.svhcHeadId = svhcHeadId;
        this.sapCode = sapCode;
        this.editDate = editDate;
    }

    /**
     * 供应商填写高度关注物质清单记录表
     */
    @TableId(value = "pk_id", type = IdType.UUID)
    @TableField("pk_id")
    private String pkId;

    /**
     * 高度关注物质清单head表id
     */
    @TableField("svhc_head_id")
    private String svhcHeadId;

    /**
     * 供应商SAP编码
     */
    @TableField("sap_code")
    private String sapCode;

    /**
     * 供应商填写表单时间
     */
    @TableField("edit_date")
    @JSONField(format = "yyyy-MM-dd")
    private Date editDate;

    @Override
    public SvhcVendorHeadEntity clone() {
        try {
            return (SvhcVendorHeadEntity) super.clone();
        } catch (CloneNotSupportedException ex) {
            ex.printStackTrace();
        }
        return null;
    }
}